package cn.bdqn.pn.service.user.impl;

import cn.bdqn.pn.pojo.user.RoleResource;
import cn.bdqn.pn.reposity.user.RoleResourceReposity;
import cn.bdqn.pn.service.user.role_ResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("role_ResourceService")
public class role_ResourceServiceImpl implements role_ResourceService {
    @Autowired
    private RoleResourceReposity role_resourceReposity;

    @Override
    public void addRoleResource(RoleResource role_resource) {
        role_resourceReposity.save(role_resource);
    }

    @Override
    public List<RoleResource> getAllRoleResourceByRoleId(Integer roleId) {
        return role_resourceReposity.findRoleResourceByRole_RoleId(roleId);
    }
}
